/* ------------------------------------------------------------------------------------------------------
 * File: energy.h
 * Description:  MAC layer library header file
 * Data: 2012/11/14
 * Author: Stephen
 * Ver: V0.1.0a
 * -------------------------------------------------------------------------------------------------------
 */
#ifndef ENERGY_H
#define ENERGY_H


#define DEVICE_ON()		MCU_IO_OUTPUT(0, 5, 1)
#define DEVICE_OFF() 	MCU_IO_OUTPUT(0, 5, 0)

/* ------------------------------------------------------------------------------------------------------
 *                                            Global Variable
 * ------------------------------------------------------------------------------------------------------
 */
extern volatile unsigned long 	iCnt;
extern volatile float 			iCnt_last;


/* ------------------------------------------------------------------------------------------------------
 *                                            Global Functions
 * ------------------------------------------------------------------------------------------------------
 */
extern void energy_init(void);

#endif

